$(function(){
	
	var editor=null;

	KindEditor.ready(function(K) {
		editor = K.create('#context', {
			themeType : 'default',
			resizeMode : 1,
			allowImageUpload : true,
			uploadJson : ctx + '/kingEditor/upload',
			fileManagerJson : ctx + '/kingEditor/fileManager',
			allowFileManager : true,
			filterMode : true,
			afterBlur:function(){
				this.sync();
			}
		});
		editor.html($("#context").val());
	});
	
	$('.colorpicker').colorpicker();
});